package hierarchy

import (
	"gitcode.com/G-YT/iHealth25/server/api/v1"
	"gitcode.com/G-YT/iHealth25/server/middleware"
	"github.com/gin-gonic/gin"
)

type LevelTwoRouter struct {
}

// InitLevelTwoRouter 初始化 LevelTwo 路由信息
func (s *LevelTwoRouter) InitLevelTwoRouter(Router *gin.RouterGroup, pubRouter *gin.RouterGroup) {
	levelTwoRouter := Router.Group("levelTwo").Use(middleware.OperationRecord())
	levelTwoRouterWithoutRecord := Router.Group("levelTwo")
	levelTwoRouterPub := pubRouter.Group("levelTwo")
	var levelTwoApi = v1.ApiGroupApp.HierarchyApiGroup.LevelTwoApi
	{
		levelTwoRouter.POST("createLevelTwo", levelTwoApi.CreateLevelTwo)             // 新建LevelTwo
		levelTwoRouter.DELETE("deleteLevelTwo", levelTwoApi.DeleteLevelTwo)           // 删除LevelTwo
		levelTwoRouter.DELETE("deleteLevelTwoByIds", levelTwoApi.DeleteLevelTwoByIds) // 批量删除LevelTwo
		levelTwoRouter.PUT("updateLevelTwo", levelTwoApi.UpdateLevelTwo)              // 更新LevelTwo
	}
	{
		levelTwoRouterWithoutRecord.GET("findLevelTwo", levelTwoApi.FindLevelTwo)                 // 根据ID获取LevelTwo
		levelTwoRouterWithoutRecord.GET("getLevelTwoList", levelTwoApi.GetLevelTwoList)           // 获取LevelTwo列表
		levelTwoRouterWithoutRecord.GET("getLevelTwoListByIds", levelTwoApi.GetLevelTwoListByIds) // 根据ID集合获取二级目录列表
	}
	{
		levelTwoRouterPub.GET("getArticle", levelTwoApi.GetArticle) // 获取LevelTwo列表
	}
}
